import { Column, Entity, PrimaryGeneratedColumn } from 'typeorm';
import { LinkTypes } from '../dtos/setting.dot';

@Entity('tb_quick', {
  comment: '快捷链接表',
})
export class Quick {
  @PrimaryGeneratedColumn('increment', { comment: '自增主键', unsigned: true })
  id: number;

  @Column({ comment: '链接名称' })
  name: string;

  @Column({ comment: '链接简称' })
  label: string;

  @Column({ comment: '链接图标' })
  icon: string;

  @Column({ comment: '链接类型', default: LinkTypes.NONE })
  link: LinkTypes;

  @Column({ comment: '排序顺序' })
  sorted: number;

  @Column({ comment: '是否显示', type: 'tinyint', default: true })
  display: boolean;
}
